<%@include file="startUpIncludes.jsp" %>
   <%--<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> --%> 
  <%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
        <title>
            Invoice Taxes
        </title>
    </head>
    <body class="stockSKUsPage">
    <jsp:include page="header.jsp" >
		<jsp:param value="true" name="loggedIn"/>
	</jsp:include>
    <div class="wrap">
	<div class="fitBG">
        <div class="main">
		<%@include file="basicLeftMenu.jsp" %>
            <div class="content">
				<jsp:include page="tabs.jsp" >
					<jsp:param value="invoice" name="currentPage"/>
				</jsp:include>
                <div class="tab-content">
                <h3>
                Invoice
                </h3>
				<div class="lead-view">
				</div>
                <div class="content-block">
                    <h4>Invoice Taxes</h4>
                    <div class="action-btns">
                    
                    </div>
	                <c:choose>
	                <c:when test="${empty taxList}">
	                <div class="noData">No data to preview...</div>
	                </c:when>
	                <c:otherwise>
                    <div class="scroll-table">
                    <table class="recent-leads">
                        <thead>
                            <tr>
                                <%-- <th class="p5"><input type="checkbox" name=""/></th> --%>
                                <th class="p40">Code</th>
                                <th class="p15">Name</th>
                                <th class="p40">Action</th>
                                <th class="p15">Info</th>
                                <th class="p15">Percentage</th>
                            </tr>
                        </thead>
                        <tbody>
    					<c:forEach items="${taxList}" var="item">
                            <tr class="even">
                                <%-- <td><input type="checkbox"/></td> --%>
                                <td>${item.code}</td>                               
                                <td>
                                <shiro:hasRole name="invoiceTaxView"><a href="view-invoice-tax.html?id=${item.id}">${item.name}</a></shiro:hasRole>
                                </td>
                                <td>
                                <c:choose>
	                                <c:when test="${userDetails.isOwner == true || userDetails.id == lead.leadOwner.id }">
	                                <shiro:hasRole name="invoiceTaxEdit"><a href="edit-invoice-tax.html?id=${item.id}">Edit</a></shiro:hasRole>
	                                <shiro:hasRole name="invoiceTaxDelete"><a href="/sales/s/delete-invoice-tax?id=${item.id}" title="Delete the selected Lead" class="delete">Delete</a></shiro:hasRole>	                                
                                 </c:when>
                                </c:choose>
                                </td>
                                <td>${item.info}</td>
                                <td>${item.percentage}</td>
                            </tr>
                		</c:forEach>
                        </tbody>
                    </table>
                    </div>
                    </c:otherwise>
                    </c:choose>
                </div>
            </div>
        </div>
        
    <%@include file="footer.jspf" %>
    </div>
    </div>

    </body>
</html>